package top.mingtea.propertymannagement.service;

import org.springframework.stereotype.Service;
import top.mingtea.propertymannagement.mapper.BuildingMapper;
import top.mingtea.propertymannagement.pojo.Building;

import java.util.List;

@Service
public class BuildingService {
    private final BuildingMapper buildingMapper;

    public BuildingService(BuildingMapper buildingMapper) {
        this.buildingMapper = buildingMapper;
    }

    public List<Building> getAll() {
        return buildingMapper.getAll();
    }

    public void add(Building building) {
        buildingMapper.add(building);
    }

    public void remove(int building_id) {
        buildingMapper.remove(building_id);
    }

    public void update(Building building) {
        buildingMapper.update(building);
    }
}
